import { createStore } from "vuex";
import EMDialogModule from "./modules/EMDialogModule"
import HospVenuAmbuModule from "./modules/HospVenuAmbuModule"
import app from "./modules/app"
import getters from "./getters.js";

export default createStore({
  state: {
    rootState:"myRootState",
    // 上次点击时间
    lastTime:(new Date()).getTime(),
  },
  mutations: {
    getLastTimeMut(state,payload){
      state.lastTime = payload.lastTime
      // console.log("超时登陆时间更新！")
    }
  },
  actions: {
    getLastTimeAct({commit},payload){
      commit("getLastTimeMut",payload)
    }
  },
  // 自定义状态管理模块
  modules:{
    EMDialogModule,
    HospVenuAmbuModule,
    app
  },
  getters,
});
